<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.bootcdn.net/ajax/libs/lodash.js/4.17.21/lodash.min.js"></script>
</head>
<style>
  #box {
    width: 300px;
    height: 300px;
    /* background-color: red; */
  }
</style>

<body>
  <div id="box">

  </div>
  <script>
    const oBox = document.getElementById('box')

    const enter = function () {
      console.log('11');
      this.style.background = "red"
    }
    const leave = function () {
      console.log('22');
      this.style.background = ""
    }
    oBox.onmouseenter = _.throttle(enter, 3000, { leading: true, trailing: false })
    oBox.onmouseleave = leave

  </script>
</body>
<script>




</script>

</html>